Repository navigation
Conversation
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
[High impact] The PR appears safe to merge; no new actionable issues were found. SummaryReplaces Prysm with
Reviews (5) · Last reviewed commit: "After code review" · Reviewed by Greptile |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: dianab-cl <diana@cosmoslabs.io>
|
|
||
| var ( | ||
| publicKeys = [][]byte{ | ||
| mustDecodeHex("84fe268400062ae6255010a421204dad5b0a8bd93522a4abc023037fa7a769f6ef29acc14c7fae8c5c0cd1df21ae1f52"), |
There was a problem hiding this comment.
where do these vectors come from? If prysm or another independent implementation produced them, the success cases prove we match the old behavior; if the new code produced them, they only show it agrees with itself.
There was a problem hiding this comment.
// The success vectors were checked against two independent implementations:
// github.com/OffchainLabs/prysm/v6@v6.1.4 crypto/bls, which this package wrapped
// before, and github.com/consensys/gnark-crypto. Both produce aggregatedPublicKey
// from publicKeys and accept aggregatedSignature over message.
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
|
@greptile review |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: dianab-cl <diana@cosmoslabs.io>
|
@greptile review |
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
|
@greptile review |
gjermundgaraba
left a comment
There was a problem hiding this comment.
One performance regression when validator keys are reused; details inline.
| if len(bz) != blst.BLST_P1_COMPRESS_BYTES { | ||
| return nil, fmt.Errorf("public key must be %d bytes", blst.BLST_P1_COMPRESS_BYTES) | ||
| } | ||
| pk := new(blst.P1Affine).Uncompress(bz) |
There was a problem hiding this comment.
[P2] Preserve caching of validated public keys
Successive light-client updates commonly reuse validator keys. Prysm cached validated points, but this loop repeats decompression and subgroup validation on every query. The review benchmark reports 100 recurring keys increasing from ~0.086 ms to ~3.32 ms per aggregation (39× slower). Please preserve reuse through a bounded, concurrency-safe cache populated only after successful validation, and add a repeated-key benchmark.
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
|
@greptile review |
Description
What does this change and why. Link the issue: fixes #
Checklist